<template>
  <div class="recommend">
    <div class="recommend_list">
      <router-link class="list_item" v-for="item in list" :key="item.id" to="/travel/travelSecond">
        <div class="item_img">
          <img :src="item.img_url" alt="">
        </div>
        <div class="item_content">
          <div class="item_box">
           <span>{{item.name}}</span>
           <div class="item_content_footer">
             <span class="item_star">
               <img :src="stars.star" v-for="stars in item.stars" :key="stars.star_id">
             </span>
              <span class="star">{{item.score}}分</span>
              <span class="person">{{item.person}}人消费</span>
            </div>
            <div class="item_bottom">
              <span class="number">￥{{item.number}}</span>
              <span class="word">起</span>
              <span class="distance">{{item.distance}}Km</span>
            </div>
          </div>
        </div>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: "TravelRecommend",
  props: {
    list: Array
  }
};
</script>

<style scoped>
.recommend_list {
  padding-left: 0.2rem;
}
.list_item {
  margin-top: 0.2rem;
  padding-top: 0.2rem;
  width: 100%;
  overflow: hidden;
}
.item_img {
  width: 1.8rem;
  height: 1.64rem;
  float: left;
  position: absolute;
}
.item_img img {
  width: 100%;
  height: 100%;
}
.item_content {
  margin-left: 1.84rem;
  text-align: left;
}
.item_box {
  margin: 0 0.2rem;
}
.item_content_footer {
  margin-top: 0.2rem;
  width: 100%;
  overflow: hidden;
}
.item_star img {
  width: 0.24rem;
  height: 0.24rem;
}
.item_content_footer span {
  float: left;
  display: block;
}
.item_content_footer span.star {
  float: left;
  color: chocolate;
}
.item_content_footer span.person {
  color: green;
  font-size: 0.3rem;
  float: right;
}
.item_bottom span.number {
  color: rgb(38, 15, 241);
  font-size: 20px;
}
.item_bottom span.distance {
  margin-top: 20px;
  float: right;
}
</style>
